package com.liu.nb.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 巡逻回执任务表
 * </p>
 *
 * @author liuziyi
 * @since 2021-08-31
 */
@Data
@ToString
@EqualsAndHashCode(callSuper = false)
public class Receiptpatrol implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 巡检任务id
     */
    private String ptid;

    /**
     * 塔杆id
     */
    private String pid;

    /**
     * 缺陷类型
     */
    private Integer bugId;

    /**
     * 缺陷级别
     */
    private Integer level;

    /**
     * 塔杆完整度
     */
    private Integer intact;

    /**
     * 任务负责人
     */
    private Integer uid;

    /**
     * 发现时间
     */
    private LocalDateTime time;

    /**
     * 描述
     */
    private String description;

    /**
     * 发现人
     */
    private Integer findpeople;

    /**
     * 发现时间
     */
    @TableField(exist = false)
    private LocalDateTime findFirstTime;
    @TableField(exist = false)
    private LocalDateTime findLastTime;

    /**
     * 下发时间
     */
    @TableField(exist = false)
    private LocalDateTime issueFirstTime;
    @TableField(exist = false)
    private LocalDateTime issueLastTime;

    /**
     * 用户表实体，多对一
     */
    @TableField(exist = false)
    private SysUser sysUser;


    /**
     * 巡检任务实体，多对一
     */
    @TableField(exist = false)
    private Patroltask patroltask;
    //线路id,一根塔杆可以对应多跟线路
    @TableField(exist=false)
    private List<String> cid;
    //发现时间-开始
    @TableField(exist=false)
    private Date beginTime;
    //发现时间-结束
    @TableField(exist=false)
    private String endTime;
    //缺陷类型
    @TableField(exist = false)
    private Bugtype bugtype;
    //缺陷等级
    @TableField(exist = false)
    private BugLevel bugLevel;
    /*
    * 该塔杆对应的消缺任务
    * */
    @TableField(exist = false)
    private Debugtask debugtask;
    /*
    * 发现人
    * */
    @TableField(exist = false)
    private SysUser findPeoplePojo;

    @TableField(exist = false)
    private String cidStr;
}
